package com.lx.pc.mybatis.repository.broadcast;

import java.math.BigInteger;
import java.util.List;

import org.springframework.data.mybatis.repository.annotation.Query;
import org.springframework.data.mybatis.repository.support.MybatisRepository;
import org.springframework.stereotype.Repository;

import com.lx.pc.domain.entity.broadcast.BroadcastEntity;

@Repository("broadcastRepository")
public interface BroadcastRepository extends MybatisRepository<BroadcastEntity, BigInteger>{

	/**
	 * 查询总数
	 */
	@Query("findByBroadcastCount")
	public int findByBroadcastCount(BroadcastEntity broadcastEntity);
	
	/**
	 * 查询方法
	 * @param page
	 * @param size
	 * @return
	 */
	@Query("findByBroadcast")
	public List<BroadcastEntity> findByBroadcast(BroadcastEntity broadcastEntity,Integer page,Integer size);
	
	/**
	 * 详情查看
	 * @param id
	 * @return
	 */
	@Query("findByBroadcastId")
	public BroadcastEntity findByBroadcastId(BigInteger id);
}
